Image processing techniques called motion stereo, monocular stereopsis, or Shape from Motion (SfM) are known as techniques for recovering a three-dimensional shape of a scene from a motion image obtained by a moving camera from moment to moment. For example, a method described in PTL 1 is known as a method for putting this technique into practice and detecting an obstacle using a video taken by a vehicle-mounted camera.
When a target object is a stationary object, i.e., when the entire scene is deemed as a rigid body, a three-dimensional shape can be recovered by the motion stereo method. However, with the motion stereo method, an incorrect three-dimensional position that can never happen in reality is calculated for a moving object. In an obstacle detection device, the moving object is a type of an obstacle, and therefore, even if a correct three-dimensional position is not always calculated, it is enough if it is determined that a point at which three-dimensional position information that can never happen in reality is calculated corresponds to the obstacle. However, processing of a moving shadow made by the moving object causes a disadvantage.
The reason why the shadow of the moving object cast upon the road surface causes a disadvantage will be explained in detail with reference to FIG. 1. FIG. 1 is an example where a pedestrian 203 and a pedestrian's shadow 204 cast on a road surface 202 appear in an image 201 of a vehicle-mounted camera. According to the motion stereo method, incorrect three-dimensional position information that can never happen in reality is calculated for pixels corresponding to the pedestrian 203 and the pedestrian's shadow 204. In these circumstances, it is not preferable for the obstacle detection device to determine that the pedestrian's shadow 204 is an obstacle. This is because the pedestrian's shadow 204 does not necessarily obstruct the passage of the vehicle. The same disadvantage occurs when the shadow of the moving vehicle appears in the image 201 of vehicle-mounted camera.
Therefore, it is desired for the obstacle detection device not to falsely determine that a moving shadow of a moving object is an obstacle. Methods disclosed in PTLs 2, 3 and 4 are examples of conventional methods that are considered to be applicable to this disadvantage.
PTL 2 discloses a shadow region determining method for a color (R, G, B) image. In the method of PTL 2, R, G, B values at a region border pixel are compared with R, G, B values of eight pixels around the region border pixel, and a determination is made as to whether the region border pixel is in a shadow region or not on the basis of the magnitude relation of the R, G, B values. When the method described in PTL 2 is applied to a video that is input from a vehicle-mounted camera of an obstacle detection device from moment to moment, it may be possible to reduce the chance of falsely determining that a point corresponding to a shadow of a moving object is an obstacle.
In a method disclosed in PTL 3, two images taken from the same position in the real word are compared, and attention is given to a region where a pixel value changes. When pixel gradations in the changed region are uniform, the region is determined to be a shadow region. In a method disclosed in PTL 4, position information of the sun is obtained, and a region of a shadow cast by a vehicle is estimated, and correction is made on an image.